home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 July / macformat-026.iso / mac / Shareware City / Developers / WASTE Object Handlers v1.0 ƒ / READ ME next >
Encoding:
Text File  |  1995-03-20  |  3.8 KB  |  64 lines  |  [TEXT/ttxt]

  1. WASTE Embedded Object Handler Archive
  2. compile by Michael F. Kamprath, <kamprath@earthlink.net>
  3.  
  4. This is a library of object handlers written in C designed for the WASTE Text Engine (by Marco Piovanelli).  This library is designed to be "drop and play," requiring very few mandatory calls by your WASTE based application.
  5.  
  6. To use this library, either add the source to your project, or, if you are using CodeWarrior, add the proper enclosed CodeWarrior library to your project.  It currently supports three types of objects: PICTs, sounds, and files.  The only header you need to include in the rest of your application's code (where appropiate) is WASTE_Objects.h.
  7.  
  8. One additional point: be sure to include the supplied resources in your project file.  Some object handlers depend on them. 
  9.  
  10. Object Handler Initialization
  11.  
  12. There is one mandatory call that your application needs to make at initialization time to load all the object handlers into the WASTE engine:
  13.  
  14. OSErr    InstallAllWASTEObjHandlers( void )
  15.  
  16. This routine will load all appropiate handlers into the WASTE engine and intialize them (if need be).  If it returns an error, not all handlers were loaded properly.
  17.  
  18. Other Handler Routines
  19.  
  20. Pictures
  21.  
  22. There are no public routines for picture objects.
  23.  
  24. Sounds
  25.  
  26. This library's method of implementing sound objects allows them to be played asynchronously.  To do this, several support routines have been implemented for your use.  Also, ICN# resource of ID 550 is used to provide the symbol for a sound object.
  27.  
  28. void    CheckSoundStatus( void )
  29.  
  30. This routine must be called periodically (ideally in the event loop).  It checks the current sound status and, if need be, deallocates any sound buffer that is no longer in use.
  31.  
  32. OSErr    PlaySelectedSound( WEHandle theWE )
  33.  
  34. This routine causes the currently selected sound in a WASTE instance to be played.  If no sound is selected, or if more "stuff" than just one sound is selected, nothing will happen.
  35.  
  36. OSErr    CreateNewSoundObject( WEHandle theWE )
  37.  
  38. This routine will use the built in sound input on the Mac to add a new sound object to a WASTE instance.
  39.  
  40. OSErr    PlaySoundHandle( SndListHandle theSound )
  41.  
  42. This routine is made public in case your application will be playing other sounds outside of WASTE sound objects.  This routine will play a sound handle on the same asyncnronous channel that the WASTE sound objects are.
  43.  
  44. Files
  45.  
  46. This library implements file onbjects with the same data that the Drag Manager describes a file with (HFSFlavor).  This allows seamless interaction with the finder and allows users to just dragh a file from the finder to a window containing a WASTE instance to add a file object.  To then open that file, the user just double clicks the file object in the WASTE instance and the Finder is sent an "Open Selection" apple event.  One public routine is provides:
  47.  
  48. OSErr    InsertFileRefFromFSSpec( FSSpec *theFile, WEHandle theWE )
  49.  
  50. This routine allows your application to insert a file object based on a passed file system specification record (typically obtained from a "Get File" dialog).
  51.  
  52. Please Read On…
  53.  
  54. Since this library is designed to be used with the WASTE text engine, this library shall fall under the same use license as the WASTE text engine.  That is, if you satisfy the use license of the WASTE text engine as outlined by Marco Piovanelli, the you are free to use this library in your application.
  55.  
  56. If you have some other object handlers that you would like to include in this library, and agree to release it under the licensing scheme listed above, please forward it on to me (Michael Kamprath) and I will incorporate it as best as possible.
  57.  
  58. If you find any bugs in the current version of this library, or have an comments for improvement, please send me a note.
  59.  
  60. Some sample code on how to use this archive in “advanced” ways is include in the Sample Code folder.
  61.  
  62. Release Info:
  63.  
  64. v1.0.0: (20 March 1995) Initial release.